package bytestream;
import bytestream.J_Student;
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
public class J_ObjectOutputStream
{
    public static void main(String args[ ])
    {
        try
        {
            ObjectOutputStream f = new ObjectOutputStream(
                new FileOutputStream("object.dat"));
            J_Student s = new J_Student( "张三", 2003001, 172);
            f.writeObject(s);
            s.mb_output( );
            f.close( );
        }
        catch (Exception e)
        {
            System.err.println("发生异常:" + e);
            e.printStackTrace( );
        } // try/catch结构结束
    } // 方法main结束
} // 类J_ObjectOutputStream结束
